<?php
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;

$menuItemsMain = [
    [
        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '权限管理'),
        'url' => ['/group/index'],
    ],
    [
        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '内容管理'),
        'url' => ['/category/index'],
    ],
    [
        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '会员管理'),
        'url' => ['/member/index'],
    ],
    [
        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '分会管理'),
        'url' => ['/fenhui/index'],
    ],
    [
        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '财务管理'),
        'url' => ['/orders/index'],
    ],
    [
        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '活动管理'),
        'url' => ['/activity/index'],
    ],
	// [
 //        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '发布管理'),
 //        'url' => ['/release/index'],
 //    ],
	// [
 //        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '专家管理'),
 //        'url' => ['/expert/index'],
 //    ],
 //    [
 //        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '资料管理'),
 //        'url' => ['/datamanagement/index'],
 //    ],
 //    [
 //        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '制度管理'),
 //        'url' => ['/institution/index'],
 //    ],
     [
         'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '系统管理'),
         'url' => ['/setting/index'],
     ],
 //    [
 //        'label' => '<!--<i class="fa fa-dashboard "></i> -->' . Yii::t('app', '项目管理'),
 //        'url' => ['/project/index'],
 //    ],

];
echo Nav::widget([
    'options' => ['class' => 'nav nav-pills navbar-left'],
    'items' => $menuItemsMain,
    'encodeLabels' => false,
]);
$menuItems = [
    ['label' => '首页', 'url' => ['/site/index']],
];
if (Yii::$app->user->isGuest) {
    $menuItems[] = ['label' => '登录', 'url' => ['/site/login']];
} else {
    $menuItems[] = [
        'label' => '退出 (' . Yii::$app->user->identity->username . ')',
        'url' => ['/site/logout'],
        'linkOptions' => ['data-method' => 'post']
    ];
}
echo Nav::widget([
    'options' => ['class' => 'nav nav-pills navbar-right'],
    'items' => $menuItems,
]);

//NavBar::end();

